{% extends "base.html" %}

{% block script %}
    <script src="/static/js/cms2/city_update.js"></script>
{% end %}

{% block settings %}
    {% set menu_selected = 'city' %}
{% end %}

{% block main %}
<div class="main_hd">
    <h2>上传地图</h2>

    <div class="title_tab" id="topTab">
        <ul class="tab_navs title_tab" data-index="0">
        <li data-index="0" class="tab_nav first js_top selected"><a href="/cms2/user/normal">普通用户</a></li>
        </ul>
    </div>
    <div class="extra_info search_bar" id="searchBar">
        <span class="frm_input_box search with_del append ">
            <a class="del_btn jsSearchInputClose" href="javascript:" style="display:none">
                <i class="icon_search_del"></i>&nbsp;
            </a>
            <a href="javascript:" class="frm_input_append jsSearchInputBt">
                <i class="icon16_common search_gray">搜索</i>&nbsp;
            </a>
        <input type="text" value="" class="frm_input jsSearchInput" placeholder="消息内容">
        </span>
    </div>
</div>
<div class="main_bd">
    <div class="topic-box">
        <div><h1 class="ret-info"></h1></div>
        <div class="t-panel">
            <div class="t-panel-heading">
                <div class="t-panel-title">已添加地图</div>
            </div>
            <div class="padding-box">
                <table class="table table-striped info-table">
                    <thead>
                    <tr>
                        <td>城市id</td>
                        <td>省份id</td>
                        <td>英文名称</td>
                        <td>中文名称</td>
                        <td>x轴坐标</td>
                        <td>y轴坐标</td>
                        <td>版本号</td>
                        <td>版本信息</td>
                        <td>顶端背景色</td>
                        <td>底部背景色</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    {% for city_info in city_info_list %}
                        <tr>
                            <td>{{ city_info['cityid'] }}</td>
                            <td>{{ city_info['provid'] }}</td>
                            <td>{{ city_info['name'] }}</td>
                            <td>{{ city_info['cname'] }}</td>
                            <td>{{ city_info['pos_x'] }}</td>
                            <td>{{ city_info['pos_y'] }}</td>
                            <td>{{ city_info['version'] }}</td>
                            <td>{{ city_info['versioninfo'] }}</td>
                            <td>{{ city_info['bgcolortop'] }}</td>
                            <td>{{ city_info['bgcolorend'] }}</td>
                            <td>
                                <button class="update-city" type="button">更新</button>
                            </td>
                        </tr>
                    {% end %}
                    </tbody>
                </table>
            </div>
        </div>
        <div class="t-panel">
            <div class="t-panel-heading">
                <div class="t-panel-title">添加城市</div>
            </div>
            <div class="padding-box">
                <table class="table add-table">
                    <thead>
                    <tr>
                        <td>城市id</td>
                        <td>省份id</td>
                        <td>英文名称</td>
                        <td>中文名称</td>
                        <td>x轴坐标</td>
                        <td>y轴坐标</td>
                        <td>版本号</td>
                        <td>版本信息</td>
                        <td>顶端背景色</td>
                        <td>底部背景色</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><input type="text" class="form-control"></td>
                            <td><button class="add-city" type="button">确认</button></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="t-panel">
            <div class="t-panel-heading">
                <div class="t-panel-title">城市更新说明</div>
            </div>
            <div class="padding-box">
                <p>
                1.x,y坐标如果不知道可以填写0。<br>2.初始版本号和版本信息为0。<br>
                3.颜色为6位，后两位自动补ff，不为6位或8位则错误。
                </p>
            </div>
        </div>
    </div>
</div>
{% end %}

{% block template %}
{% end %}